<template>
  <div class="lay-main">
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          :collapse="isCollapse"
        >
          <el-menu-item index="1">
            <i class="iconfont icon-a-Group21"></i>
            <span slot="title">活动管理</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="iconfont icon-a-Group22"></i>
            <span slot="title">达人库</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="iconfont icon-tuandui"></i>
            <span slot="title">社团管理</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="iconfont icon-a-Group24"></i>
            <span slot="title">积分申请管理</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="iconfont icon-xinyuandan"></i>
            <span slot="title">小小心愿</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="iconfont icon-a-Group26"></i>
            <span slot="title">商圈联盟</span>
          </el-menu-item>
          <el-menu-item index="7">
            <i class="iconfont icon-CombinedShape"></i>
            <span slot="title">邻里圈</span>
          </el-menu-item>
          <el-submenu index="4">
            <template slot="title">
              <i class="iconfont icon-a-Group20"></i>
              <span slot="title">积分管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1">积分排名</el-menu-item>
              <el-menu-item index="1-2">积分流水</el-menu-item>
              <el-menu-item index="1-2">积分配置</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main
        >Main
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "",
  props: [""],
  data() {
    return {
      isCollapse: false,
      menu: [
        {
          path: "/activity",
          name: "活动管理",
          icon: "icon-a-Group21",
        },
        {
          path: "/talent",
          name: "达人库",
          icon: "icon-a-Group22",
        },
        {
          path: "/club",
          name: "社团管理",
          icon: "icon-tuandui",
        },
        {
          path: "/scoreApply",
          name: "积分申请管理",
          icon: "icon-a-Group24",
        },
        {
          path: "/wish",
          name: "小小心愿",
          icon: "icon-xinyuandan",
        },
        {
          path: "/business",
          name: "商圈联盟",
          icon: "icon-a-Group26",
        },
        {
          path: "/neighbourhood",
          name: "邻里圈",
          icon: "icon-CombinedShape",
        },
        {
          path: "/scoreRanking",
          name: "积分管理",
          icon: "icon-a-Group20",
          child: [
            {
              path: "/scoreRanking",
              name: "积分排名",
              icon: "",
            },
            {
              path: "/scoreMoney",
              name: "积分流水",
              icon: "",
            },
            {
              path: "/scoreConfig",
              name: "积分配置",
              icon: "",
            },
          ],
        },
      ],
    };
  },

  components: {},

  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },

  watch: {},
};
</script>
<style lang='scss' scoped>
.lay-main {
  height: 100vh;
  /deep/.el-container {
    height: 100%;
    .iconfont {
      margin-right: 8px;
    }
    .el-submenu__title {
      height: 50px;
      line-height: 50px;
    }
    .el-menu-item {
      height: 40px;
      line-height: 40px;
      margin-bottom: 10px;
    }
    .el-menu-item.is-active {
      color: #1890ff;
      background-color: #e6f7ff;
    }
    .el-menu-item:focus,
    .el-menu-item:hover {
      color: #1890ff;
      background-color: rgba(0, 0, 0, 0);
      .iconfont {
        color: #1890ff;
      }
    }
    .el-submenu__title:hover {
      color: #1890ff;
      background-color: rgba(0, 0, 0, 0);
      .el-submenu__icon-arrow {
        color: #1890ff;
      }
      .iconfont {
        color: #1890ff;
      }
    }
  }
}
</style>